1. Field of the invention
The present invention relates to a computer, and more specifically to a computer capable of executing a program of the volume larger than the address space of a memory which can be normally address-designated by a central processing unit.
2. Description of related art
Hitherto, a so-called "bank-switched system" has been adopted for executing a program in volume larger than an address space which can be normally designed by a central processing unit (called "CPU" hereinafter). This system is realized by using a flipflop and the like for giving an additional address portion in place higher than an address given by a so-called program counter associated to the CPU.
For example, referring to FIG. 1, there is one example of a conventional system in which an address space is extended. In the shown system, a CPU 1 can only ouput an address of n bits A.sub.1 to A.sub.n to a memory 2, but a flipflop circuit 3 provided in addition to the CPU 1 outputs an address signal A.sub.n+1 to the memory 2. Thus, an address space which can be accessed by the CPU 1 will substantially extended by the amount which can be designated by the flipflop circuit 3. In the example shown in FIG. 1, since the flipflop circuit 3 is assumed to give one bit, if the content of the flipflop circuit 3 can be set and reset, the address space which can be accessed by the CPU 1 is doubled in comparison with the case having no flipflop circuit 3. Namely, the address space is extended from the size designated by the address of A.sub.1 to A.sub.n to the size designated by the address of A.sub.1 to A.sub.n+1.
In general, there are two methods for handling the flipflop circuit 3. A first method is to use an input/output instruction for the CPU. A second method is called "memory mapped I/O".
In the first method, one of addresses for input/output instructions is allocated to the flipflop circuit 3. In the second method, on the other hand, the memory address space accessible by the CPU is divided into two address space portions, i.e., an normally accessible address space before memory space extension and an extended address space, and different conditions of the flipflop are allocated to the two address space portions. In addition, the content of the flipflop is controlled by respective operation instructions. Thus, the address space is switched. These address space portions to be switched are called "banks".
In the bank-switched system mentioned above, at least one instruction is required for switching the banks. Accordingly, in the case of instructions such as a subroutine call, a return, and a jump instruction, which have to frequently branch from one bank to another, bank switching instructions will frequently appear, with the result that the address space for programs will correspondingly be restricted and the execution time of programs will be increased.